/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.enrstu.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import me.zhengjie.modules.system.domain.Dict;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
* @website https://eladmin.vip
* @description /
* @author yyx
* @date 2024-09-10
**/
@Entity //作为hibernate实体类
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table(name="pmf_manage")// 映射的表明
@AllArgsConstructor
@NoArgsConstructor
public class Manage implements Serializable {

    @Id
    @Column(name = "`id`",nullable = false)
    @ApiModelProperty(value = "项目id")
    private String id;


    @Column(name = "`pmf_name`")
    @NotBlank
    @ApiModelProperty(value = "项目名称")
    private String pmfName;

    @Column(name = "`pmf_affiliation_annual`")
    @NotNull
    @ApiModelProperty(value = "所属年度")
    private Integer pmfAffiliationAnnual;

    @Column(name = "`pmf_project_start_status`")
    @ApiModelProperty(value = "启用状态(0-待启用，1-已启用)")
    private Integer pmfProjectStartStatus;

    @Column(name = "`pmf_parent_fill_start_time`")
    @NotNull
    @ApiModelProperty(value = "家长填报开始时间段")
    private Date pmfParentFillStartTime;

    @Column(name = "`pmf_parent_fill_end_time`")
    @NotNull
    @ApiModelProperty(value = "家长填报结束时间段")
    private Date pmfParentFillEndTime;

    @Column(name = "`pmf_school_check_start_time`")
    @NotNull
    @ApiModelProperty(value = "学校初审开始时间段")
    private Date pmfSchoolCheckStartTime;

    @Column(name = "`pmf_school_check_end_time`")
    @NotNull
    @ApiModelProperty(value = "学校初审结束时间段")
    private Date pmfSchoolCheckEndTime;

    @Column(name = "`pmf_education_check_start_time`")
    @NotNull
    @ApiModelProperty(value = "教育局二审开始时间段")
    private Date pmfEducationCheckStartTime;

    @Column(name = "`pmf_education_check_end_time`")
    @NotNull
    @ApiModelProperty(value = "教育局二审结束时间段")
    private Date pmfEducationCheckEndTime;

    @Column(name = "`pmf_publish_time`")
    @NotNull
    @ApiModelProperty(value = "公布时间")
    private Date pmfPublishTime;

    @Column(name = "`pmf_create_person_id`")
    @NotNull
    @ApiModelProperty(value = "创建人id(当前登录用户id)")
    private Long pmfCreatePersonId;




    @Column(name = "`pmf_minimum_age`")
    @ApiModelProperty(value = "最小年龄限制")
    private String pmfMinimumAge = "";



    @Column(name = "`gmt_create`")
    @NotNull
    @CreationTimestamp
    @ApiModelProperty(value = "创建时间戳")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @Column(name = "`gmt_modified`")
    @NotNull
    @UpdateTimestamp
    @ApiModelProperty(value = "更新时间戳")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    public void copy(Manage source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }


}
